/**
 * Created with PyCharm.
 * User: lyhapple
 * Date: 12-6-30
 * Time: 下午11:33
 */
//重新获取验证码
function reloadVerifycode() {
    try {
        jQuery("#codeImg").attr('src', "/pub/verifyCode/?d=" + Math.random());
    } catch (e) {
        alter("验证码加载(reloadVerifycode)出错,请检查!");
    }
}

//检查验证码，正确则提交表单，错识则提示
function checkVerifyCode() {
    var code = jQuery("#verifyCode").val();
    var B = false;
    jQuery.ajax({
        type:"GET",
        async:false,
        url:"/pub/check/code",
        data:"verifyCode=" + code + "&d=" + new Date().getTime(),
        dataType:"text",
        success:function (msg) {
            if (msg == "true") {
                B = true;
                //$("form[name='"+form_name+"']").submit();
            } else {
                alert("验证码与服务器端不一致,请重新输入!");
                B = false;
            }
        }
    });
    jQuery("#verifyCode").focus();
    return B;
    //$("form[name='"+form_name+"']").submit();
}

function sinaLogin() {
    alert("aaaa");
}
function qqLogin() {
    alert("bbb");
}